package com.fourth.rabbit;

import com.alibaba.fastjson.JSON;
import com.fourth.config.RabbitConfiguration;
import io.lettuce.core.dynamic.annotation.CommandNaming;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author Mr.ma
 * @since 2023/3/12 20:45
 **/
@Component
public class MsgProducer {

    @Resource
    RabbitTemplate rabbitTemplate;

    public void createMst(String code){
        rabbitTemplate.convertAndSend(RabbitConfiguration.EXCHANGE_NAME,RabbitConfiguration.ROUTING_KEY, code);
    }
}
